﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using DAL.Repositories;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Model.Entities;

namespace Test
{
    [TestClass]
    public class B_GenerateIntervals
    {
        [TestMethod]
        public void GenerateAreaIntervals()
        {
            var intervalRep = new IntervalRepository();

            Interval areaInterval; 
            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "do 40 m2",
                LowerBoundary = 0,
                UpperBoundary = 40
            };
            intervalRep.Create(areaInterval);

            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "40 - 50 m2",
                LowerBoundary = 40,
                UpperBoundary = 50
            };
            intervalRep.Create(areaInterval);

            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "50 - 60 m2",
                LowerBoundary = 50,
                UpperBoundary = 60
            };
            intervalRep.Create(areaInterval);

            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "60 - 80 m2",
                LowerBoundary = 60,
                UpperBoundary = 80
            };
            intervalRep.Create(areaInterval);

            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "80 - 100 m2",
                LowerBoundary = 80,
                UpperBoundary = 100
            };
            intervalRep.Create(areaInterval);

            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "120 - 140 m2",
                LowerBoundary = 120,
                UpperBoundary = 140
            };
            intervalRep.Create(areaInterval);

            areaInterval = new Interval()
            {
                Category = IntervalCategory.Area,
                Name = "160 - 200 m2",
                LowerBoundary = 160,
                UpperBoundary = 200
            };
            intervalRep.Create(areaInterval);
        }
    }
}
